<template>
    <div>
        <div id="mainP41y" style="width: 100%;height:6.25rem;position: absolute;left: 0;top: 0;margin: auto;"></div>
    </div>
</template>
  
<script setup lang="ts">
import { ref, onMounted } from 'vue';
import * as echarts from 'echarts';
import { RequestStatisticGetCarByProcess } from "@/api/path/index.js";

// 基于准备好的dom，初始化echarts实例
// 绘制图表
onMounted(() => {
    var chartDom = document.getElementById('mainP41y');
    var myChart = echarts.init(chartDom);
    var option;

    option = {
        color: ['#e8f4ff', '#31c4cb'],
        series: [
            {
                name: 'Access From',
                type: 'pie',
                radius: ['60%', '70%'],
                avoidLabelOverlap: false,
                label: {
                    show: false,
                    position: 'center'
                    // fontSize:'40',
                },
                labelLine: {
                    show: false
                },
                data: [
                    { value: 1048, name: 'Search Engine' },
                    { value: 735, name: 'Direct' }
                ]
            }
        ]
    };

    option && myChart.setOption(option);
})
</script>
<style lang="scss" scoped></style>